package com.logica.mdm.webservices.dao;

import java.util.List;
import java.util.Map;

import com.logica.mdm.webservices.dao.beans.PartyByMdmIdResultBean;
import com.logica.mdm.webservices.dao.beans.PartyByPhoneNumberResultBean;
import com.logica.mdm.webservices.dao.beans.PartyResultBean;
import com.logica.mdm.webservices.messages.SearchPartyRequest;

/**
 * Interface defining the searchPartyContract
 */
public interface SearchPartyDao {

	/**
	 * Search party by sqlQuery and parameters
	 * @param sqlQuery the query with named parameters
	 * @param sqlParams map containing the parameters
	 * @return list of corresponding results
	 */
	List<PartyResultBean> searchParty(String sqlQuery, Map<String, ?> sqlParams);

	/**
	 * Search party by sqlQuery and parameters
	 * @param sqlQuery the query with named parameters
	 * @param sqlParams map containing the parameters
	 * @return list of corresponding results
	 * @throws Exception 
	 */
	List<PartyResultBean> searchParty(SearchPartyRequest searchParams) throws Exception;
	
	/**
	 * Search party by Phone Number
	 * @param sqlQuery the query with named parameters
	 * @param sqlParams map containing the parameters
	 * @return list of corresponding results
	 */
	List<PartyByPhoneNumberResultBean> searchPartyByPhoneNumber(String sqlQuery, Map<String,?> sqlParams);
	
	/**
	 * Search Party by Mdm Id 
	 * @param sqlQuery the query with named parameter
	 * @param sqlParams map containing the parameters (mdmId)
	 * @return the corresponding party bean
	 */
	PartyByMdmIdResultBean searchPartyByMdmId(String sqlQuery, Map<String, ?> sqlParams);
}
